home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / c / library / dos / games / trivia / second.c next >
Encoding:
C/C++ Source or Header  |  1992-07-10  |  501 b   |  22 lines

  1. #include <stdio.h>
  2.  
  3. main()
  4. {
  5.    int yard,feet,inch;
  6.  
  7.    printf("Please enter the length to be converted: ");
  8.    scanf("%d",&yard);
  9.     while(yard > 0) {
  10.       inch=36*yard;
  11.       feet=3*yard;
  12.       printf("%d yard(s) = \n",yard);
  13.       printf("%d feet \n",feet);
  14.       printf("%d inches \n",inch);
  15.       printf("Please enter another length to be /n");
  16.       printf("converted (0 stops program): ");
  17.       scanf("%d",&yard);
  18.    }
  19.    printf(">>> End of Program <<<");
  20.    return(0);
  21. }
  22.